package com.soft.link.impl;

import com.soft.link.mapper.TsUserRoleMapper;
import com.soft.link.model.TsRole;
import com.soft.link.model.TsUserRole;
import com.soft.link.service.TsUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * company 重庆庆云石油工程技术有限责任公司
 * FileName TsUserRoleServiceImpl
 * Package com.soft.link.impl
 * Description 人员角色接口实现
 * author Administrator
 * create 2018-03-31 22:20
 * version V1.0
 */
@Service
public class TsUserRoleServiceImpl implements TsUserRoleService {
    @Autowired
    TsUserRoleMapper tsUserRoleMapper;

    /**
     * @param userId 根据人员ID 查询人员所拥有的角色
     * @methodname findTsUserRoleList
     * @Description 查询当前人员组织机构 ；
     * @author 黄学乾
     * @create 2018/3/31/031 22:36
     */
    @Override
    public List<TsUserRole> findTsUserRoleList(String userId) throws Exception {
        List<TsUserRole> tsUserRoleList = tsUserRoleMapper.findTsUserRoleList(userId);
        return tsUserRoleList;
    }

    /**
     * @param tsRoles 角色基本信息
     * @throws {数据库连接异常和其他异常}
     * @methodname findTsUserRoleListByTsRole
     * @Description {根据角色，查询人员角色关联信息}
     * @author 黄学乾
     * @create 2018/4/30/030 16:36
     */
    @Override
    public List<TsUserRole> findTsUserRoleListByTsRole(List<TsRole> tsRoles) {
        List<TsUserRole> ts = new ArrayList<>();
        if (tsRoles != null && tsRoles.size() > 0) {

        }
        return ts;
    }
}
